import {SAVE_PRODUCT} from "../constant"

const initState = []
let product_reducer = (preState = initState,action) => {
    const {type,data} = action
    switch (type) {
        case SAVE_PRODUCT:
            return data
        default:
            return preState
    }
}

export default product_reducer